<template>
  <div class="el-custom-from">
    <el-tabs v-model="activeName" class="node-tabs-kts" v-loading="loading">
      <el-tab-pane name="property">
        <template #label>
          <div>
            <span class="font_16px font_Title">
              <i class="el-icon-edit"></i>
              {{ this.$t("flowi18n.flow_current_task_info") }}
            </span>
          </div>
        </template>
        <div id="From_div_style" :style="autoHeight">
          <el-container>
            <el-main id="el-custom-form-main">
              <div :style="contentHeight">
                <el-scrollbar>
                  <el-table :data="tasks" style="width: 100%" stripe border>
                    <el-table-column
                      :show-overflow-tooltip="true"
                      prop="reCNName"
                      :label="$t('flowi18n.flow_current_task_review')"
                      width="200"
                    >
                      <template #default="scope">
                        <el-tag
                          size="medium"
                          type="warning"
                          v-if="scope.row.reCNName != ''"
                          >{{ scope.row.reCNName }}</el-tag
                        >
                      </template>
                    </el-table-column>
                    <el-table-column
                      prop="currentStep"
                      :label="$t('flowi18n.flow_current_task_step')"
                      min-width="180"
                      :show-overflow-tooltip="true"
                    >
                    </el-table-column>
                    <el-table-column
                      prop="reStatus"
                      :label="$t('flowi18n.flow_current_task_step_stats')"
                      min-width="180"
                      :show-overflow-tooltip="true"
                    >
                    </el-table-column>
                  </el-table>
                </el-scrollbar>
              </div>
            </el-main>
          </el-container>
        </div>
      </el-tab-pane>
    </el-tabs>
    <div style="position: absolute;right:25px;top:2px;">
      <el-button
        class="el-field-title-close"
        @click="closedEvent"
        type="text"
        icon="el-icon-close"
        >{{ $t("table.Global_Back") }}</el-button
      >
    </div>
  </div>
</template>
<script>
let windowHeight = parseInt(window.innerHeight);
export default {
  name: "flow-workbench-propety",
  data() {
    return {
      contentHeight: {
        height: "",
      },
      autoHeight: {
        height: "",
        width: "98%",
        float: "left",
      },
      activeName: "property",
      loading: true,
      flowVersionId: 0,
      tasks: [],
    };
  },
  methods: {
    ///设置窗台的高度
    getHeight() {
      this.autoHeight.height = windowHeight - 60 + "px";
      this.contentHeight.height = windowHeight - 120 + "px";
    },
    ///加载流程属性
    InitFlow(tasks) {
      this.tasks = tasks;
      this.loading = false;
    },
    closedEvent() {
      this.$emit("ClosedEvent");
    },
  },
  mounted() {
    window.addEventListener("resize", this.getHeight);
    this.getHeight();
  },
  components: {},
};
</script>
